package com.ywu.file.sys.standard.api;

import com.ywu.common.result.CommonResult;
import com.ywu.file.sys.standard.dto.YwuFIleTaskDto;
import com.ywu.file.sys.standard.service.YwuFIleTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName YwuFileTaskApi
 * @Description TODO
 * @Author GroundDemo
 * @Date 2024/9/15 12:06
 * @Version 1.0
 **/
@RestController
@RequestMapping("/ywu/file/task")
public class YwuFileTaskApi {
    @Autowired
    private YwuFIleTaskService service;

    /**
    * @Author GroundDemo
    * @Description 查询任务列表
    * @Date 16:06 2024/9/15
    * @Param [taskDto]
    * @return com.ywu.common.result.CommonResult<com.ywu.file.sys.standard.dto.YwuFIleTaskDto>
    **/
    @PostMapping("/task.pageList")
    public CommonResult<List<YwuFIleTaskDto>> queryTaskList(@RequestBody YwuFIleTaskDto taskDto) {
        return service.queryTaskList(taskDto);
    }

    /**
    * @Author GroundDemo
    * @Description 创建任务记录
    * @Date 10:35 2024/9/16
    * @Param [taskDto]
    * @return com.ywu.common.result.CommonResult<java.lang.Object>
    **/
    @PostMapping("/task.create.info")
    public CommonResult<Object> taskCreate(@RequestBody YwuFIleTaskDto taskDto) {
        return service.taskCreate(taskDto);
    }

}
